package cn.sun.dictionary.service.impl;

import cn.sun.basic.service.impl.BaseServiceImpl;
import cn.sun.dictionary.domain.DictionaryType;
import cn.sun.dictionary.mapper.DictionaryTypeMapper;
import cn.sun.dictionary.query.DictionaryTypeQuery;
import cn.sun.dictionary.service.IDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryTypeServiceImpl extends BaseServiceImpl<DictionaryType, DictionaryTypeQuery> implements IDictionaryTypeService {
    @Autowired
    private DictionaryTypeMapper typeMapper;

    @Override
    public void save(DictionaryType type) {
        typeMapper.save(type);
        this.update(type);
    }

    @Override
    public void update(DictionaryType type) {
        typeMapper.update(type);
    }

    @Override
    public void drukdel(List<Long> ids) {
        typeMapper.drukdel(ids);
    }

    @Override
    public List<DictionaryType> getDeptTree() {
        return typeMapper.getDeptTree();
    }
}
